package com.yunpeng.dynamic.page;

import com.yunpeng.dynamic.page.start.CloseListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;


/**
 * 应用启动类
 *
 * @author : Moore(hemw)
 * @date : 2020-03-11
 */
@SpringBootApplication(scanBasePackages = {"com.yunpeng.dynamic.page", "com.yunpeng"})
@PropertySource("classpath:application.yml")
@ServletComponentScan
@EnableAspectJAutoProxy
@EnableTransactionManagement
public class Application extends SpringBootServletInitializer {


    /**
     * 日志对象
     */
    private static final Logger LOGGER = LoggerFactory.getLogger(Application.class);


    public static void main(String[] args) {
        SpringApplication sa = new SpringApplication(Application.class);
        sa.addListeners(new CloseListener());
        sa.run(args);
    }


}